// 参数： id ， 项目名称 ， 项目进度，数量，交付日期，状态，项目人员，周月年查询,负责人
const { sequelize, DataTypes } = require('sequelize');
const { ISFORCE } = require("../utils/dot");

const { Op } = require('sequelize');
const seq = require("../db/index");
const projectDetailModel = seq.define('projectDetailModel', {
    projectName: {
        type: DataTypes.STRING,
        allowNull: false,
        comment: "项目名称"
    },
    projectProgress: {
        type: DataTypes.STRING,
        allowNull: false,
        comment: "项目进度"
    },
    projectLeader: {
        type: DataTypes.STRING,
        allowNull: false,
        comment: "负责人"
    },
    deliveryDate: {
        type: DataTypes.DATE,
        allowNull: false,
        comment: "交付日期"
    },
    status: {
        type: DataTypes.STRING,
        allowNull: false,
        comment: "状态"
    },
    projectPersonnel: {
        type: DataTypes.STRING,
        allowNull: false,
        comment: "项目人员"
    },
    isDelete: {
        type: DataTypes.BOOLEAN,
        defaultValue: false,
        comment: "是否删除"
    }
}, {});

if (ISFORCE == "true") {
    projectDetailModel.sync({ force: true });
}

module.exports = projectDetailModel;